import { GTable, GTableSchema } from 'geminis-react';

export default () => {

  const schema: GTableSchema = {
    headerTitle: '角色信息',
    data: {
      url: '/api/resources/role',
      sort: ['name:asc'],
    },
    action: {
      toolbar: {
        add: {
          form: {
            schemaPath: '/resources-pc/schema/role/edit.json',
          },
        },
      },
      row: {
        edit: true,
        delete: true,
      },
    },
  };

  return (
    <GTable
      schemaPath="/resources-pc/schema/role/table.json"
      schema={schema}
    />
  );
};
